Legacy Vector Palette

…can still be used in 3.0.2
Delete any line with S57DataLocation= ,and add the line below in the opencpn.ini file

[Directories]

PresentationLibraryData=C:\Program Files\OpenCPN\s57data\S52RAZDS.RLE


OpenCPN 2.5
Vector chart color palettes are in the file s57data\S52RAZDS.RLE
At the top of this file are lines like
CCIE 31LANDA0.3600(0x1b)0.4000(0x1b)49.00(0x1b)brown
Note the “escape” characters (0x1b)

The colors are encoded in a hard-to-interpret CCIE color map or Yxy (Y=LRV).
consider line:
CCIE 31LANDA0.4182 0.4220 62.03 brown
0.4182 is x
0.4220 is yOpenCPN 2.5
62.03 is Y
so the color is 62.03,0.4182,0.4220 in Yxy… plug those values into
EasyRGB.com and you get the color in every available color space.

HTTP = #F6C86E
Web safe = #FFCC66
RGB 0-255 = 245.98 200.02 110.02
RGB 0-FF = F5 C8 6E
RGB 0-0.1 = 0.96462 0.78439 0.43144
CMY 0-0.1 = 0.03538 0.21561 0.56856
CMYK % = 0.000 18.684 55.274 3.538
XYZ = 61.471 62.030 23.489
Yxy = 62.030 0.41820 0.42200
CIE-L*ab = 82.929 5.976 50.618
CIE-L*CH = 82.929 50.970 83.267
CIE-L*uv = 82.929 36.230 61.612
HunterLab = 78.759 1.491 37.449
Illuminant = D65
Observer = 2° (1931)

The names are somewhat descriptive (e.g. LANDA for land area, etc.)
There is code to convert from ccie to RGB near s52plib.cpp(387). No inverse transform (RGB to ccie), though. Google is your friend or easyrgb.com .

If you browse this file you will see that the colors are referenced by rules which render the various features, e.g.
0001 500090
LUPT 40LU00090NILLNDAREA00001SPLAIN_BOUNDARIES
ATTC 1
INST 10AC(LANDA)DISC 12DISPLAYBASE
LUCM 612010
0
Decode: LUPT……LNDARE…. (a LNDARE feature)
INST……AC(LANDA) (AreaColor LANDA)
etc.

Anyway, you can fiddle with the values in this file, and no recompile is necessary. S52RAZDS.RLE is read as a data file. You can specify its location in the config file opencpn.ini like this:
PresentationLibraryData=C:\\Users\\Will\\AppData\\Roaming\\opencpn\\CAD.RLE


Default color palette from libs52 of the openev project:



Example modified SHOM.RLE file to resemble SHOM charts:


Download SHOM.RLE(Remove the .doc extension)

Example modified CAD.RLE file to resemble Canadian raster charts:


Download CAD.RLE(Remove the .doc extension)